﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Learn.Remoting.Server
{
    public class MyRemotingHelloServer : MarshalByRefObject
    {
        public MyRemotingHelloServer(string a)
        {
            Console.WriteLine("HelloServer activated");
            Console.WriteLine("Parameter passed to the constructor is ");
        }
        public String HelloMethod(String myName)
        {
            Console.WriteLine("HelloMethod : {0}", myName);
            return "Hi there " + myName;
        }

        public int i
        {
            get;
            set;
        }

        public int Count()
        {
            return i++;
        }
    }
}
